<template>
  <div>
    <h1 v-text="msg" ref="title"></h1>
    <School ref="school"></School>
    <button ref="btn" @click="showMsg">点我提示msg</button>
  </div>
</template>

<script>
import School from "./components/School.vue";
export default {
  name: "App",
  components: {
    School,
  },
  data() {
    return {
      msg: '使用Vue'
    }
  },
  methods: {
    showMsg() {
      // alert(this.$refs.title)
      console.log('this.$refs.title',this.$refs.title);
      console.log('this.$refs.school',this.$refs.school);
      console.log('this.$refs.btn',this.$refs.btn);
    }
  }
};
</script>

<style>
</style>